#include <stdio.h>
#include <stdlib.h>

#include "queue.h"
int main()
{
	queue *sq;
	datatype arr[] = {2,34,23,12,45};

	sq = qu_create();
	if (sq == NULL)
		exit(1);

	int i = 0;
	for (i=0;i<6;i++)
	{
		qu_enqueue(sq,arr+i);
	}
	qu_travel(sq);
#if 0
	int ret = 0;
	datatype temp = 100;
	ret = qu_enqueue(sq,&temp);
	if (ret == -1)
		printf("queue is full.\n");
	else
		qu_travel(sq);
#endif
#if 0
	datatype temp = 0;
	for (i = 0;i<2;i++)
	{
		qu_dequeue(sq,&temp);
		printf("dequeue temp:%d\n",temp);
	}
	qu_travel(sq);
#endif 

	qu_clear(sq);
	printf("clear!\n");
	qu_travel(sq);

	qu_destory(sq);
	exit(0);
}
